<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        var color =['red','purple','blue','green'];
        
        var prize = [1,2,3,4];
  
        var Mike = [];
        var Elle = [];
        var Rohan = [];
        var Fatma = [];
      //  var Whole = [];

        var count1=0;
        var count2=0;
        var count3=0;
        var count4=0;
        var count=0;
        for(let i = 0;i<color.length;i++){
            for(let j=0;j<prize.length;j++){
                Mike[count1++] = {
                    color:color[i],
                    prize:prize[j]
                },
                Elle[count3++] = {
                    color:color[i],
                    prize:prize[j]
                },
                Rohan[count2++] = {
                    color:color[i],
                    prize:prize[j]
                },
                Fatma[count4++] = {
                    color:color[i],
                    prize:prize[j]
                }
            }
        }


            
        // }
        for(let i=0;i<Mike.length;i++){
            for(let j=0;j<Elle.length;j++){
                for(let k=0;k<Rohan.length;k++){
                    for(let l=0;l<Fatma.length;l++){
                        if((Mike[i].color!==Elle[j].color && Mike[i].color!==Rohan[k].color && Mike[i].color!==Fatma[l].color && Elle[j].color!==Rohan[k].color && Elle[j].color!==Fatma[l].color &&Rohan[k].color!==Fatma[l].color) && (Mike[i].prize!==Elle[j].prize && Mike[i].prize!==Rohan[k].prize && Mike[i].prize!==Fatma[l].prize && Elle[j].prize!==Rohan[k].prize && Elle[j].prize!==Fatma[l].prize &&Rohan[k].prize!==Fatma[l].prize) ){
                            //    console.log(Mike[i],Elle[j],Rohan[k],Fatma[l])
                            //    count++;
                            if(Elle[j].color==='purple' && Rohan[k].color!=='green' && Mike[i].prize!==1 && Mike[i].prize!==4 && Elle[j].prize!==1 && Elle[j].prize!==4 && Fatma[l].color!=='blue' && Fatma[l].prize!==1){
                               //console.log(Mike[i],Elle[j],Rohan[k],Fatma[l],'****')
                               if(Mike[i].color==='green'){
                                   if(Mike[i].prize<Elle[j].prize){
                                     console.log('Mike'+',color:'+Mike[i].color+',prize:'+Mike[i].prize,'\nElle'+',color:'+Elle[j].color+',prize:'+Elle[j].prize,'\nRohan'+',color:'+Rohan[k].color+',prize:'+Rohan[k].prize,'\nFatma'+',color:'+Fatma[l].color+',prize:'+Fatma[l].prize)
                                   }
                                   
                               }else if(Fatma[l].color==='green'){
                                    if(Fatma[l].prize<Elle[j].prize){
                                        console.log('Mike'+',color:'+Mike[i].color+',prize:'+Mike[i].prize,'\nElle'+',color:'+Elle[j].color+',prize:'+Elle[j].prize,'\nRohan'+',color:'+Rohan[k].color+',prize:'+Rohan[k].prize,'\nFatma'+',color:'+Fatma[l].color+',prize:'+Fatma[l].prize)
                                    }
                               }else if(Elle[j].color==='green'){
                                    if(Elle[j].prize<Elle[j].prize){
                                        console.log('Mike'+',color:'+Mike[i].color+',prize:'+Mike[i].prize,'\nElle'+',color:'+Elle[j].color+',prize:'+Elle[j].prize,'\nRohan'+',color:'+Rohan[k].color+',prize:'+Rohan[k].prize,'\nFatma'+',color:'+Fatma[l].color+',prize:'+Fatma[l].prize)
                                    }
                               }else if(Rohan[k].color==='green'){
                                    if(Rohan[k].prize<Elle[j].prize){
                                        console.log('Mike'+',color:'+Mike[i].color+',prize:'+Mike[i].prize,'\nElle'+',color:'+Elle[j].color+',prize:'+Elle[j].prize,'\nRohan'+',color:'+Rohan[k].color+',prize:'+Rohan[k].prize,'\nFatma'+',color:'+Fatma[l].color+',prize:'+Fatma[l].prize)
                                    }
                               }
                               
                            //   count++
                            //    if(Mike[i].color==='blue'){
                            //         if(Mike[i].price<Fatma[l].price){
                            //             console.log(Mike[i],Elle[j],Rohan[k],Fatma[l])                                      
                            //         }
                            //    }else if(Rohan[k].color==='blue'){
                            //         if(Rohan[k].price<Fatma[l].price){
                            //             console.log(Mike[i],Elle[j],Rohan[k],Fatma[l])
                            //         }
                            //    }
                            


                            }
                        }
                    }
                }
            }
        }

       


    
    // </script>
</head>
<body>
    
</body>
</html>